<?php
/**
 * appRain v 0.1.x
 *
 * LICENSE
 *
 * This source file is subject to the MIT license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.opensource.org/licenses/mit-license.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@apprain.com so we can send you a copy immediately.
 *
 * @copyright  Copyright (c) 2010 appRain, Team. (http://www.apprain.com)
 * @license    http://www.opensource.org/licenses/mit-license.php MIT license
 *
 * HELP
 *
 * Official Website
 * http://www.apprain.com/
 *
 * Download Link
 * http://www.apprain.com/download
 *
 * Documents Link
 * http ://www.apprain.com/docs
 */

class Development_AddonFxs extends appRain_Base_Objects
{

    /**
     * Create accordion
     -----------------------------------
     * @parameter id string
     * @parameter data_array array
     * @parameter ta string
     * @parameter to string
     * @return string
     */
    /*public function create_accordion($id = "accordion",$data_array,$ta = "#41464D",$to = "#FFFFFF")
    {
        $toggle =  $id . "toggler" . time();
        $element = $id . "element" . time();
        $str ="";
        foreach($data_array as $val)
        {
            $str .= $this->get_tag("h3",array("class" => "$toggle"),$val['title']);
            $str .= $this->get_tag("div",array("class" => "$element"),$val['content']);
        }
        return '<script type="text/javascript">' .
                    "window.addEvent('domready', function(){
                        var myAccordion = new Accordion($('" . $id . "'), '."  . $toggle . "', '."  . $element . "', {
                            opacity: true,
                            onActive: function(toggler, element){
                                toggler.setStyle('color', '" . $ta . "');
                            },
                            onBackground: function(toggler, element){
                                toggler.setStyle('color', '" . $to . "');
                            }
                        });
                    });"
                . '</script>' . $this->get_tag('div',array("id" => "$id"),$str );
    }*/

    /**
     * Generate Auto complete
     -----------------------------------
     * @parameter name string
     * @parameter data_arr array
     * @parameter value string
     * @parameter options array
     * @return string
     */
    /*public function autocompleteTag( $name = NULL, $data_arr = NULL, $value = NULL , $options = NULL)
    {
        // Populate the object ID
        $options['id'] = isset( $options['id'] ) ? $options['id'] : "id_" . rand(100000,999999);

        // Make the token list
        $tokens= " var " . $options['id'] . "_token = [";
        foreach( $data_arr as $key => $val)
        {
            $tokens .= ( $key == 0) ? "'$val'" : ",'$val'";
        }
        $tokens .= "];";

        return  "<script type=\"text/javascript\">//<![CDATA[
                    window.addEvent(\"domready\", function() {
                         $tokens
                        // selectMode 'type-ahead' allows fast typing
                        new Autocompleter.Local('" . $options['id'] . "', " . $options['id'] . "_token, {
                            'minLength': 1,
                            'overflow': true,
                            'selectMode': 'type-ahead'
                        });

                    });
                    //]]></script>" . '<input type="text" name="' . $name .'" value="' . $value . '" ' . $this->options2str( $options ) . '/>';
    }*/
}
